import request from '@/utils/request'

// 获取轮播图
export function getBanners() {
  return request({
    url: '/car-vehicle/common/banners',
    method: 'get'
  })
}

// 获取公告
export function getNotices() {
  return request({
    url: '/car-vehicle/common/notices',
    method: 'get'
  })
}

// 获取热门搜索
export function getHotSearches() {
  return request({
    url: '/car-vehicle/common/hot-searches',
    method: 'get'
  })
}

// 上传文件
export function uploadFile(data) {
  return request({
    url: '/car-vehicle/common/upload',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 获取验证码
export function getCaptcha(phone) {
  return request({
    url: '/car-vehicle/common/captcha',
    method: 'get',
    params: { phone }
  })
}

// 验证验证码
export function verifyCaptcha(phone, code) {
  return request({
    url: '/car-vehicle/common/verify-captcha',
    method: 'post',
    data: { phone, code }
  })
} 